import Vuex from "vuex";
import Vue from "vue";

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
    userInfo: {
      birthday: "",
      introduce: "",
      nickname: "",
      sex: "",
    },
  },
  mutations: {
    getUserInfo(state, payload) {
      state.userInfo.birthday = payload.birthday;
      state.userInfo.introduce = payload.introduce;
      state.userInfo.nickname = payload.nickname;
      state.userInfo.sex = payload.sex;
    },
  },
});

export default store;
